#pragma once

#include "Common.h"
#include "Vertex.h"

enum BufferUsage
{
	BUFFERUSAGE_StreamDraw	= 0x88E0,
	BUFFERUSAGE_StreamRead	= 0x88E1,
	BUFFERUSAGE_StreamCopy	= 0x88E2,
	BUFFERUSAGE_StaticDraw	= 0x88E4,
	BUFFERUSAGE_StaticRead	= 0x88E5,
	BUFFERUSAGE_StaticCopy	= 0x88E6,
	BUFFERUSAGE_DynamicDraw	= 0x88E8,
	BUFFERUSAGE_DynamicRead = 0x88E9,
	BUFFERUSAGE_DynamicCopy = 0x88EA,
};

class VertexBuffer
{
public:
	VertexBuffer();
	~VertexBuffer();
public:
	void SetData(void* data, unsigned int size, BufferUsage bufferUsage = BUFFERUSAGE_StaticDraw);
public:
	const unsigned int 	GetID() const;
	const unsigned int 	GetVertexCount() const;
	const Vertex* 		GetData() const;
private:
	unsigned int m_nID;
	unsigned int m_nVertexCount;
	Vertex* m_pData;
};